<?php
include_once($_SERVER['CONTEXT_DOCUMENT_ROOT'].'/admin/public/header.php');
include_once($_SERVER['CONTEXT_DOCUMENT_ROOT'].'/public/func.php');
$config = include_once($_SERVER['CONTEXT_DOCUMENT_ROOT'].'/public/config.php');

$time=$_POST['addtime']=date("Y-m-d H:i:s",time());
$res=add($config,'notice',$_POST);


if ($res) {
  echo '<script>alert("添加成功");window.location.href="index.php"</script>';
}else{
  '<script>alert("添加失败");window.location.href="zeng.php"</script>';
};
